package com.bwda.dsrs.filecenter.domain.form.userlog;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * simple introduction
 *
 * @author wangju
 * @date 2019/7/31
 */
@Data
@ApiModel(description = "日志表")
public class UserLogTreeFrom {

	@ApiModelProperty(value = "ID")
	private String id;

	@ApiModelProperty(value = "ID列表")
	private List<Integer> idList;

	@ApiModelProperty(value = "用户编号")
	private String userCode;

	@ApiModelProperty(value = "用户姓名")
	private String userName;

	@ApiModelProperty(value = "组织ID")
	private Integer orgId;

	@ApiModelProperty(value = "组织名称")
	private String orgName;

	@ApiModelProperty(value = "IP地址")
	private String ipAddr;

	@ApiModelProperty(value = "访问客户端标识")
	private String userAgent;

	@ApiModelProperty(value = "文件ID")
	private Integer fileId;

	@ApiModelProperty(value = "文件名称，全称aa.doc")
	private String fileName;

	@ApiModelProperty(value = "文件大小")
	private String fileSize;

	@ApiModelProperty(value = "原文件ID")
	private Long originFileId;

	@ApiModelProperty(value = "0下载1流转2外发3共享4编辑")
	private Integer optType;

	@ApiModelProperty(value = "结果")
	private String result;

	@ApiModelProperty(value = "来源")
	private String source;

	@ApiModelProperty(value = "请求URI")
	private String requestUri;

	@ApiModelProperty(value = "请求方式get,post")
	private String method;

	@ApiModelProperty(value = "访问参数")
	private String params;

	@ApiModelProperty(value = "请求内容")
	private String requestContent;

	@ApiModelProperty(value = "0")
	private Integer fileLogType;

	@ApiModelProperty(value = "异常信息")
	private String exceptionMsg;

	@ApiModelProperty(value = "登录token")
	private String loginToken;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	@ApiModelProperty(value = "开始时间")
	private Date startTime;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	@ApiModelProperty(value = "结束时间")
	private Date endTime;

	@ApiModelProperty(value = "tree")
	private List<UserLogTreeFrom> children;


	@ApiModelProperty(value = "结果")
	private Integer status;


	@ApiModelProperty(value = "操作行为类型")
	private String operateType;

	@ApiModelProperty(value = "操作行为名称")
	private String operateContent;

	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",  timezone = "GMT+8")
	private Date createTime;
}
